package org.colafries.admin.entity.domain.index;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
* 业务限定表
*
* @author Ann
* @since 2024-06-03
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "t_idx_logic_condition")
public class LogicCondition implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 业务限定id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 业务限定code
     */
    @TableField("code")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long code;

    /**
     * 业务限定版本
     */
    @TableField("version")
    private Integer version;

    /**
     * 来源逻辑表code
     */
    @TableField("logic_table_code")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long logicTableCode;

    /**
     * 限定英文名
     */
    @TableField("field")
    private String field;

    /**
     * 限定名称
     */
    @TableField("alias")
    private String alias;

    /**
     * 限定描述
     */
    @TableField("description")
    private String description;

    /**
     * 计算逻辑
     */
    @TableField("expression")
    private String expression;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;

    /**
     * 修改人
     */
    @TableField("update_user")
    private String updateUser;

}
